package com.correo.database.beans;

import java.util.Iterator;
import java.util.Set;

import com.correo.vista.server.windows.ventanasInternas.ComboTablas;

public class OfficeBean implements IBean{

    private String name;    
    
    private Set<CasillaCorreoBean> listaCasillaCorreo;
    private Set<OfficeBean> relationship;

    private String descripcion;
    
    public String toString(){
    	return name;
    }
    public OfficeBean () {
    }
    public OfficeBean (String name) {
    	this.name  = name;
    }

    public Set<CasillaCorreoBean> getListaCasillaCorreo () {
        return listaCasillaCorreo;
    }

    
    public void setListaCasillaCorreo (Set<CasillaCorreoBean> val) {
        this.listaCasillaCorreo = val;
    }

    public String getName () {
        return name;
    }

    public void setName (String val) {
        this.name = val;
    }

    public Set<OfficeBean> getRelationship () {
        return relationship;
    }

    public void setRelationship (Set<OfficeBean> val) {
        this.relationship = val;
    }


	

	public String getDescripcion() {
		return descripcion;
	}


	public void setDescripcion(String descripcion) {
		this.descripcion = descripcion;
	}
	public ComboTablas getCombo() {
		Iterator<OfficeBean> it=relationship.iterator();
		ComboTablas combo=new ComboTablas();
    	while(it.hasNext()){
    		combo.addItem(it.next());
    	}
    	return combo;
	}
}

